<?php
namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Dcat\Admin\Traits\ModelTree;
use Illuminate\Database\Eloquent\Model;

class CourseClass extends Model
{
    use HasDateTimeFormatter, ModelTree;

    protected $table = 'course_class';

    protected $primaryKey = 'id';

    protected $titleColumn = 'name';

    protected $orderColumn = 'sort';

    protected $parentColumn = 'pid';

    protected $fillable = [
        'pid', // 上级ID
        'name', // 名称
        'img', // 图片
        'sort', // 排序值
        'status', // 状态 0-禁用 1-正常
    ];
}
